<template>
  <div>
    <!-- 日历组件，拿到选择时间 -->
    {{ time | formatT }}
    <hm-calendar v-model="time"></hm-calendar>
  </div>
</template>
<script>
import HmCalendar from './components/hm-calendar.vue'
import dayjs from 'dayjs'
export default {
  components: {
    HmCalendar: HmCalendar
  },
  data () {
    return {
      time: new Date('2020-11-11')
    }
  },
  filters: {
    formatT (t) {
      return dayjs(t).format('YYYY-MM-DD')
    }
  }
}
</script>
<style></style>
